package com.itheima_06;

import java.util.concurrent.CountDownLatch;

public class Childer2 extends  Thread{
    private CountDownLatch countDownLatch;
    private String name;
    public Childer2(CountDownLatch countDownLatch,String name) {
        this.countDownLatch=countDownLatch;
        super.setName(name);
    }
    @Override
    public void run() {
        for (int i = 1; i < 16; i++) {
            System.out.println(Thread.currentThread().getName()+"吃了"+i+"个饺子");
        }
        countDownLatch.countDown();
    }
}
